Conventionally, as an image processing method, a method of acquiring multiple images including a position deviation, aligning the multiple images, and generating an interpolated image by interpolation processing based on the multiple images has been suggested (for example, refer to patent literature 1). With this method, an image is selected that is used in generation of a composite image by an optimization process in which positioning precision is weighted.